home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
tcxl551.arc
/
TCXL_INC.EXE
/
lha
/
INC
/
TCXLMOU.H
< prev
next >
Wrap
Text File
|
1990-10-01
|
6KB
|
112 lines
/*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
| Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved
|
| This Library is part of IDC's TesSeRact Development Tools product
| line. For information about other IDC products, call 1-215-884-3373.
*----------------------------------------------------------------------*
| <TCXLmou.h> : Definitions and prototypes for TCXL Microsoft-compatible
| mouse functions.
*-------------------------------[ Notes ]------------------------------*
| 1) All mouse positions are in terms of text rows and columns.
| 2) MSinit() and MSterm() MUST not be called by user code. They are
| called by the TCXL initialization and termination functions.
| 3) MSpush() and MSpop() position the mouse cursor.
*----------------------------------------------------------------------*
| PGS : $Id: tcxlmou.h 5.51 90/10/01 00:00:00 MLM Release Locker: MLM $
| $Log: tcxlmou.h $
| Revision 5.51 90/10/01 00:00:00 MLM
| TCXL 5.51
|
*======================================================================*/
#ifndef _TCXLmou_
# define _TCXLmou_ 1
# ifndef _TCXLkey_
# include <TCXLkey.h>
# endif
/*- support level ------*/
#define MOU_NONE 0x00 /* no mouse support */
#define MOU_KEYS 0x01 /* emulate arrow keys */
#define MOU_CURS 0x02 /* free-moving cursor */
#define MOU_FULL 0x03 /* full mouse support */
/*- global flags -------*/
#define MOU_INIT 0x80 /* mouse initialized */
#define MOU_3BTN 0x40 /* 3-button mouse */
/*------------------[ Data objects and access macros ]------------------*/
TYP struct Mou MouT; /*- mouse-control object -----*/
struct Mou /* 00 *- 16-level stack ------*/
{ BytT mlvl; /* 00 : head support-level */
BytT mcol; /* 01 : head text column */
BytT mrow; /* 02 : head text row */
BytT mstk[45]; /* *-----------------------*/
BytT mflg; /* 30 : global flags */
BytT mbtn; /* 31 : button-status */
IntT mcnt; /* 32 : button-count */
IntT mhor; /* 34 : horizontal motion */
IntT mver; /* 36 : vertical motion */
KeyT mlkc; /* 38 : left-button keycode */
KeyT mrkc; /* 3A : right-button keycode */
KeyT mmkc; /* 3C : middle-button keycode */
WrdT mfut; /* 3E : reserved for future */
}; /* 40 ]-----------------------*/
GBL MouT CDC _MouCtl; /*- global mouse-control object ----*/
#define MouLvl (_MouCtl.mlvl) /* head level */
#define MouNone (0 == (MouLvl & MOU_FULL)) /* support off */
#define MouKeys (0 != (MouLvl & MOU_KEYS)) /* arrow */
#define MouCurs (0 != (MouLvl & MOU_CURS)) /* free */
#define MouFull (0 != (MouLvl & MOU_FULL)) /* full */
#define MouCol (_MouCtl.mcol) /* head column */
#define MouRow (_MouCtl.mrow) /* head row */
#define MouFlg (_MouCtl.mflg) /* global flags */
#define MouInit (0 != (MouFlg & MOU_INIT)) /* initialized */
#define Mou3btn (0 != (MouFlg & MOU_3BTN)) /* 3-button */
#define MouBtn (_MouCtl.mbtn) /* button-status */
#define MouLeft (0 != MouBtn & 0x01) /* left */
#define MouRght (0 != MouBtn & 0x02) /* right */
#define MouCent (0 != MouBtn & 0x04) /* center */
#define MouCnt (_MouCtl.mcnt) /* button-count */
#define MouHor (_MouCtl.mhor) /* horiz. motion */
#define MouVer (_MouCtl.mver) /* vert. motion */
#define MouLkey (_MouCtl.mlkc) /* left keycode */
#define MouRkey (_MouCtl.mrkc) /* right keycode */
#define MouMkey (_MouCtl.mmkc) /* middle keycode */
/*-------------------------[ function prototypes ]----------------------*/
#ifdef __cplusplus /* no mangling, please */
extern "C" {
#endif
VOID PAS _MSget(NOARG); /* Internal */
VOID PAS _MSpos(NOARG); /* Internal */
VOID PAS _MSset(NOARG); /* Internal */
VOID PAS _MSsho(IntT s); /* Internal */
VOID PAS MSclear(NOARG); /* Clear button counts */
VOID PAS MScurs(WrdT t, WrdT s, /* Set text cursor */
WrdT c);
VOID PAS MSgoto(IntT r, IntT c); /* Put cursor */
VOID PAS MShide(NOARG); /* Hide cursor */
VOID PAS MShome(NOARG); /* Home cursor, clear counts */
IntT PAS MSinit(NOARG); /* Intitialize mouse-support */
VOID PAS MSkeys(KeyT l, KeyT r, /* Assign left, right, middle */
KeyT m); /* button keycodes */
VOID PAS MSlimit(IntT sr, IntT sc, /* Set screen limits */
IntT er, IntT ec);
VOID PAS MSmove(NOARG); /* Get mouse motion */
VOID PAS MSpop(NOARG); /* Pop state off stack */
VOID PAS MSpress(IntT b); /* Get button presses */
VOID PAS MSpush(IntT m); /* Push state onto stack */
VOID PAS MSreles(IntT b); /* Get button releases */
VOID MSshow(NOARG); /* Show cursor */
VOID PAS MSspeed(IntT x, IntT y); /* Set speed */
VOID PAS MSstat(NOARG); /* Get status */
VOID PAS MSterm(NOARG); /* Terminate mouse-support */
VOID PAS MSupdat(IntT sr, IntT sc, /* Set conditional region */
IntT er, IntT ec);
#define MSshow() (_MSsho(0))
#ifdef __cplusplus
}
#endif
#endif /* _TCXLmou_ -- End of TCXLmou.h */